<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        $(document).ready(function() {
            $("b01").click(function() {
                //  ajax() 方法通过 HTTP 请求加载远程数据。
                html.obj = $.ajax({
                    url: "/jquery/test01.txt",
                    async: false
                })
                $("myDiv").html(html.obj.responseText);
            })
        })
    </script>
</head>

<body>
    <div class="myDiv">
        <h2>通过 AJAX 改变文本</h2>
    </div>
    <button id="b01" type="button">改变内容</button>
</body>

</html>